@import 'root-vars';
@import 'shared';
@import 'loader';

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--link-background-color);
  color: var(--link-text-color);
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

button {
  outline: none;
  -webkit-tap-highlight-color: var(--link-button-highlight-color);
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--link-text-color);
}

.link-root {
  @extend %default-font;

  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;

  position: absolute;
}

:local(.logo) {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 24px;

  img {
    width: 247px;
  }

  @media(max-height: 600px) {
    display: none;
  }

  @media(max-width: 690px) {
    display: none;
  }
}

:local(.link) {
  display: flex;
  align-items: center;
  justify-content: center;
}

:local(.link-contents) {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  color: var(--link-text-color);
  font-weight: bold;
  font-size: 1.2em;
  max-width: 650px;

  @media (max-width: 690px) {
    flex-direction: column;
  }
}

:local(.entered-footer) {
  margin: 16px;
  font-size: 0.8em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  @media (max-width: 690px) {
    display: none;
  }
}

:local(.entered-contents) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

:local(.create-link) {
  margin-top: 1em;
  font-size: 0.8em;

  @media(max-width: 690px) {
    margin-top: 12px;
  }
}

:local(.code-loading-panel) {
  background: var(--link-code-loading-background);
}

:local(.entry-footer-image) {
  width: 200px;
  margin: 12px;
  margin-top: 24px;
}


:local(.footer-image) {
  width: 200px;
  margin: 12px;

  @media (max-height: 719px) {
    display: none;
  }
}

:local(.header) {
  text-align: center;
  white-space: pre-wrap;
}

:local(.footer) {
  margin: 16px;
  font-size: 0.8em;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  @media (min-width: 691px) , (max-height: 650px) {
    display: none;
  }
}

:local(.keypad) {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr 1fr;
  text-align: center;
  background-color: var(--link-keypad-background-color);
  border-radius: 24px;
  padding: 12px;
}

:local(.keypad-button) {
  @extend %big-icon-button;
  @extend %default-font;
  font-weight: bold;
  color: $action-label-color;
  font-size: 1.4em;
  border-radius: 128px;
  box-shadow: 0px 2px 12px #ccc;
  min-width: 80px;
  min-height: 80px;
  cursor: pointer;
  line-height: 68px;
  margin: 8px;
  background: var(--link-button-background-color);
}

:local(.keypad-button):active {
  background-color: var(--link-button-active-background-color);
}

:local(.keypad-button):disabled {
  color: var(--link-button-disabled-color);
}

:local(.keypad-backspace) , :local(.keypad-backspace):disabled , :local(.keypad-backspace):active, :local(.keypad-toggle-mode), :local(.keypad-toggle-mode):disabled, :local(.keypad-toggle-mode):active {
  border: none;
  background: transparent;
  box-shadow: none;
  color: var(--link-text-color);
}

:local(.keypad-backspace) {
  grid-column: 3;
}

:local(.keypad-backspace):active {
  background-color: transparent;
  color: var(--link-button-active-color);
}

:local(.keypad-toggle-mode) {
  font-size: 1.0em;
}

:local(.entered) {
  @extend %default-font;
  height: 100px;
  width: 300px;
  text-align: center;
  font-size: 2.0em;
  color: var(--link-text-color);
  display: flex;
  justify-content: center;
}

:local(.char) {
  margin: 8px;
}

:local(.char-input) {
  @extend %default-font;
  font-weight: bold;
  outline-style: none;
  appearance:textfield;
  -moz-appearance:textfield;
  -webkit-appearance:textfield;
  background: transparent;
  margin: 0;
  font-size: 52pt;
  border: 0;
  width: 295px;
  letter-spacing: 0.08em;
  text-align: center;
  color: var(--link-entry-color);
}

:local(.char-input::placeholder) {
  letter-spacing: 0;
}

:local(.headset-icon) {
  width: 64px;
  height: 64px;
  background-color: var(--link-icon-color);
  border-radius: 32px;
  margin-bottom: 8px;
  padding-right: 2px;
  cursor: pointer;
}

:local(.link-headset-footer-link) {
  display: flex;
  align-items: center;

  img {
    width: 32px;
    height: 32px;
    border-radius: 32px;
    margin-bottom: 8px;
    margin-right: 16px;
    padding-right: 2px;
    cursor: pointer;
  }
}
